"use strict";
cc._RF.push(module, '7a6d92PoYVEcrfGRNFiHcXp', 'Base64');
// scripts/Base64.js

"use strict";

var e = require;
var t = module;
var o = exports;

var _ii,
    nn = void 0 && (void 0).__extends || (_ii = function ii(t, e) {
  return (_ii = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _ii(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    rr = void 0 && (void 0).__awaiter || function (t, e, o, i) {
  return new (o || (o = Promise))(function (n, a) {
    function r(t) {
      try {
        l(i.next(t));
      } catch (e) {
        a(e);
      }
    }

    function s(t) {
      try {
        l(i["throw"](t));
      } catch (e) {
        a(e);
      }
    }

    function l(t) {
      var e;
      t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
        t(e);
      })).then(r, s);
    }

    l((i = i.apply(t, e || [])).next());
  });
};

var oo = void 0 && (void 0).__decorate || function (e, t, a, n) {
  var i,
      o = arguments.length,
      s = o < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, a) : n;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(e, t, a, n);else for (var r = e.length - 1; r >= 0; r--) {
    (i = e[r]) && (s = (o < 3 ? i(s) : o > 3 ? i(t, a, s) : i(t, a)) || s);
  }
  return o > 3 && s && Object.defineProperty(t, a, s), s;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});
var a = cc._decorator,
    n = a.ccclass,
    i = (a.property, function () {
  function e() {}

  return e.prototype.Base64 = function () {
    var e = this,
        t = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789+/=";
    this.encode = function (o) {
      var a,
          n,
          i,
          r,
          s,
          l,
          _,
          c = "",
          d = 0;

      for (o = e._utf8_encode(o); d < o.length;) {
        r = (a = o.charCodeAt(d++)) >> 2, s = (3 & a) << 4 | (n = o.charCodeAt(d++)) >> 4, l = (15 & n) << 2 | (i = o.charCodeAt(d++)) >> 6, _ = 63 & i, isNaN(n) ? l = _ = 64 : isNaN(i) && (_ = 64), c = c + t.charAt(r) + t.charAt(s) + t.charAt(l) + t.charAt(_);
      }

      return c;
    }, this.decode = function (o) {
      var a,
          n,
          i,
          r,
          s,
          l,
          _ = "",
          c = 0;

      for (o = o.replace(/[^A-Za-z0-9\+\/\=]/g, ""); c < o.length;) {
        a = t.indexOf(o.charAt(c++)) << 2 | (r = t.indexOf(o.charAt(c++))) >> 4, n = (15 & r) << 4 | (s = t.indexOf(o.charAt(c++))) >> 2, i = (3 & s) << 6 | (l = t.indexOf(o.charAt(c++))), _ += String.fromCharCode(a), 64 != s && (_ += String.fromCharCode(n)), 64 != l && (_ += String.fromCharCode(i));
      }

      return e._utf8_decode(_);
    };
  }, e.prototype._utf8_encode = function (e) {
    e = e.replace(/\r\n/g, "\n");

    for (var t = "", o = 0; o < e.length; o++) {
      var a = e.charCodeAt(o);
      a < 128 ? t += String.fromCharCode(a) : a > 127 && a < 2048 ? (t += String.fromCharCode(a >> 6 | 192), t += String.fromCharCode(63 & a | 128)) : (t += String.fromCharCode(a >> 12 | 224), t += String.fromCharCode(a >> 6 & 63 | 128), t += String.fromCharCode(63 & a | 128));
    }

    return t;
  }, e.prototype._utf8_decode = function (e) {
    for (var t = "", o = 0, a = 0, n = 0, i = 0; o < e.length;) {
      (a = e.charCodeAt(o)) < 128 ? (t += String.fromCharCode(a), o++) : a > 191 && a < 224 ? (n = e.charCodeAt(o + 1), t += String.fromCharCode((31 & a) << 6 | 63 & n), o += 2) : (n = e.charCodeAt(o + 1), i = e.charCodeAt(o + 2), t += String.fromCharCode((15 & a) << 12 | (63 & n) << 6 | 63 & i), o += 3);
    }

    return t;
  }, oo([n], e);
}());
o["default"] = i;

cc._RF.pop();